<!--<h2>Edit <#%= resource_name.to_s.humanize %></h2>-->
<div class="row">
	<div class="col-md-9">
		<div class="panel panel-default">
			<div class="panel-heading">
				个人资料设置
			</div>
			<div class="panel-body">
					<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
						<%= devise_error_messages! %>
						<div class="form-group">
							<%= f.label "名字"%><br/>
							<%= f.text_field :name,class:'form-control'%>
						</div>




						<div class="form-group">
							<%= f.label "邮箱" %><br />
							<%= f.email_field :email, autofocus: true,class: 'form-control' %>
						</div>



						<div class="form-group">
							<%= f.label "QQ"%><br/>
							<%= f.text_field :QQ,class:'form-control'%>
						</div>
						<div class="form-group">
							<%= f.label "电话"%><br/>
							<%= f.telephone_field :telephone,class: 'form-control'%>
						</div>
						<div class="form-group">
							<%= f.label "公司"%><br/>
							<%= f.text_field :company,class:'form-control'%>
						</div>
						<div class="form-group">
							<%= f.label "个人介绍"%><br/>
							<%= f.text_area :self_introduce,class:'form-control',rows: "6"%>
						</div>



						<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
							<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
						<% end %>

						<div class="form-group">
							<%= f.label "密码" %> <i>(如果不想改变就保持空白)</i><br />
							<%= f.password_field :password, autocomplete: "off",class: 'form-control' %>
						</div>

						<div class="form-group">
							<%= f.label "密码确认" %><br />
							<%= f.password_field :password_confirmation, autocomplete: "off" ,class: 'form-control'%>
						</div>

						<div class="form-group">
							<%= f.label "当前密码" %> <i>(需要您的当前密码来确认改变)</i><br />
							<%= f.password_field :current_password, autocomplete: "off" ,class: 'form-control'%>
						</div>

						<div class="actions">
							<%= f.submit "确认",class: 'btn btn-primary' %>
						</div>
					<% end %>

					<h3>退出我的账户</h3>

					<p>不开心? <%= button_to "退出我的账户", registration_path(resource_name), data: { confirm: "你确定 ?" }, method: :delete,class: 'btn btn-primary' %></p>

					<%= link_to "返回", :back %>
			</div>
		</div>
	</div>

	<div class="col-md-3">
		<div class="panel panel-default">
			<div class="panel-body">

				<div class="media">
					<div class="media-heading media-left">
						<!--<#%= image_tag("3.png",size: "100")%>-->
						<%=gravatar_for(current_user,size: "100")%>
					</div>
					<div class="media-body">
						<%= form_tag 'http://upload.qiniu.com',multipart: true  do %>
							<%qiniu_token=generate_qiniu_upload_token %>
							<%= hidden_field_tag :token, qiniu_token%>
							<!--<#%= hidden_field_tag :save_key,"abc.png"%>-->
							<input name="key" type="hidden" value="<%= filename + "aa.jpg"%>">
							<div class="field">
								<!--<#%= label_tag :title%><br>-->
								<!--<#%= text_area_tag 'x:title'%>-->
							</div>
							<div class="field">
								<%= label_tag :'头像上传'%>
								<%= file_field_tag :file%>
							</div>
							<!--<#%= hidden_field_tag(:key,'1')%>-->
							<div class="actions">
								<%= submit_tag '确定',class: 'btn btn-default btn-xs'%>
							</div>
						<%end%>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>